package com.ruoyi.zyx.api;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.ZyxDevice;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.zyx.domain.ZyxCost;
import com.ruoyi.zyx.domain.ZyxOrderBill;
import com.ruoyi.zyx.domain.ZyxSendorder;
import com.ruoyi.zyx.service.IZyxDeviceService;
import com.ruoyi.zyx.service.IZyxOrderBillService;
import com.ruoyi.zyx.service.IZyxSendorderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.text.ParseException;
import java.util.Date;

@RestController
@RequestMapping("/zyxSendOrderApi")
public class ZyxSendOrderApi extends BaseController {
    @Autowired
    private IZyxSendorderService zyxSendorderService;

    @GetMapping(value = "/getInfoByid/{id}")
    public AjaxResult getInfoBySendorderid(@PathVariable("id") Long id)
    {
        return AjaxResult.success(zyxSendorderService.selectZyxSendorderById(id));
    }

    /**
     * 提交费用
     * @param zyxSendOrder
     * @return
     */
    @PostMapping("updSendorderApi")
    public AjaxResult updSendorderApi(@RequestBody ZyxSendorder zyxSendOrder)
    {
        return toAjax(zyxSendorderService.onlyupd(zyxSendOrder));
    }

}
